#include "myLine.h"
#include <QDebug>

myLine::myLine(QWidget *parent) : QLineEdit (parent)
{

}

void myLine::keyPressEvent(QKeyEvent *ev)
{
    if((ev->key()>='A'&&ev->key()<='Z')||(ev->key()>='0'&&ev->key()<='9'))
    {
        QLineEdit::clear();
        QLineEdit::keyPressEvent(ev);
    }
    else
    {
        qDebug()<<"error";
    }
}
